clear
rng(20)

%%% THE CODE BELOW PRODUCES THE THREE GRAPHS IN FIGURE 1. PAUSE THE CODE
%%% AFTER EACH LOOP TO SAVE THE FIGURES
for kappa = [0.01 0.5 1]
params = [0.1   0.0222    0.1398     4     7   kappa];
[trade_share_4, relative_quality_tau4] = steady_state_simulation_relative_quality(params);

params = [0.1   0.0222    0.1398     1.5     7   kappa];
[trade_share_15, relative_quality_tau_15] = steady_state_simulation_relative_quality(params);

[f1,xi] = ksdensity(relative_quality_tau4,0.1:0.1:50);
[f2,x2] = ksdensity(relative_quality_tau_15,0.1:0.1:50);

hold on
plot(xi, f1, 'k--','LineWidth',2.0)
plot(x2, f2, 'k','LineWidth',2.0)
axis([0 6 0 1.5])
yticks([0 0.5 1 1.5 2])
set(gcf,'color','white')
%xlabel('Relative Quality US/OECD')
%ylabel('Density')
ax = gca
ax.YAxis.FontWeight = 'bold';
ax.XAxis.FontWeight = 'bold';
ax.YAxis.FontSize = 16
ax.XAxis.FontSize = 16
legend('\tau = 4','\tau = 1.5')
legend boxoff
lgd = legend;
lgd.FontSize = 20;
lgd.FontWeight = 'bold';
hold off
end